<%@ page contentType="text/html; charset=UTF-8"%>
<%@page import="com.hsd.core.cache.DictCache"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<%@ include file="/app/include.jsp"%>
		<script type="text/javascript">
        	window.UEDITOR_HOME_URL = ctx + "/common/ueditor/";
        </script>
		<style>
			.inner-table{text-align: center;border:1px solid #d4d4d4; border-collapse:collapse;}
			.inner-table thead th{font-weight: normal;}
			.inner-table tbody tr{cursor: pointer;}
			.inner-table th{border-right:1px solid #c1c9b5;height:25px;line-height:25px; color:#333; white-space:nowrap; background:#e9f5d7;}
			.inner-table td{padding:3px 2px; color:#333;border-right:1px solid #dcdedb;background:#fff;}
			.inner-table tr.even td{background:#f0f0f0;}
			.inner-table tr:hover td{background:#fff8d7;}
			.inner-table tr.active td{background:#feeba2;}
			.overflow_warp {position: relative;zoom: 1}
			.select-menubutton {width: 430px;background-color: #fff;border: none;-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;box-shadow: 0 1px 7px rgba(0, 0, 0, 0.5);padding: 3px 0 2px;position: absolute;zoom: 1;text-align: left;z-index: 2000}
			.msg{width: 100%;text-align: center;height: 100px;border:1px solid #dcdedb;padding-top: 30px;}
		</style>
		<script src="<%=basePath%>/biz/data/insert-one-hp.js"></script>
		<script src="<%=basePath%>/common/ueditor/ueditor.files.js"></script>
		<script src="<%=basePath%>/common/single/jquery.json-2.2.min.js"></script>
		<script type="text/javascript">
			function loadDssinfo(rid){ 
					$.ajax({   
				        type:'GET'  
				        ,url: ctx + 'datamanage/loadHpDss1.do?rid='+rid,
				        dataType: "json",
						type: "post",                         
				        contentType:"application/x-www-form-urlencoded;charset=UTF-8",  
				        beforeSend:function(data){   
				            $('#dsslist1').html('数据加载中......');
				        }//发送请求前   
				        ,success:function(data){     
				        	var shiyingzheng = "";
				        	var jinjizheng = ""; 
				        	$(data).each(function(index,reslut){
								 var dtype = reslut[0].type;
								 if('1' == dtype){
									 shiyingzheng+=reslut[1].dssname+'&nbsp;&nbsp;&nbsp;';
								 }
								 if('2' == dtype){
									 jinjizheng+=reslut[1].dssname+'&nbsp;&nbsp;&nbsp;';
								 } 
								//table +=  "<tr><td><input id='ck_effect" + reslut.id + "' " + checked + " type='checkbox' value='"+index+"'></td><td>" + reslut.effectname + "</td><td>" + reslut.type + "</td></tr>"
							});
				            $('#dsslist1').html(shiyingzheng);   
				            $('#dsslist2').html(jinjizheng);   
				        }//请求成功后   
				        ,error:function(data){   
				            $('#dsslist1').html('数据加载失败.')   
				        }//请求错误   
				        ,complete:function(data){    

				        }   
				    });    
				 
			} 
			function loadEffectinfo(rid){
				$.ajax({   
			        type:'GET'  
			        ,url: ctx + 'datamanage/loadHpEffecs1.do?rid='+rid
			        ,data:'', 
			        dataType: "json",
					type: "post",  
			        contentType:"application/x-www-form-urlencoded;charset=UTF-8",  
			        beforeSend:function(data){   
			            $('#effectlist').html('数据加载中......');
			        }//发送请求前   
			        ,success:function(data){   
			        	var gongxiaostr = ""; 
			        	$(data).each(function(index,reslut){ 
							 gongxiaostr+=reslut[1].effectname+'&nbsp;&nbsp;&nbsp;';
							 
							//table +=  "<tr><td><input id='ck_effect" + reslut.id + "' " + checked + " type='checkbox' value='"+index+"'></td><td>" + reslut.effectname + "</td><td>" + reslut.type + "</td></tr>"
						}); 
			            $('#effectlist').html(gongxiaostr);    
			        }//请求成功后   
			        ,error:function(data){   
			            $('#effectlist').html('数据加载失败.')   
			        }//请求错误   
			        ,complete:function(data){    

			        }   
			    });    
			}
			function returnList(){
			   document.location.replace(ctx+'/datamanage/loadHpList.do');
			}
		</script>
	</head>
	<body>
		<!--右侧内容-->
		<div class="right_content"> 
			<div class="list-wrap" style="position: relative;">  
					<table width="100%" border="0" cellpadding="0" cellspacing="0"
						class="new">
						<tr> 
							<td colspan="4" align="center">
								<font size="5" color=red><strong>${hpinfo.hpName}-[<open:out valueset="[调养方案类别]" value="${hpinfo.type}" />]</strong></font>
							</td> 
						</tr>
						
						<tr>
							<td width="10%">
								方案内容
							</td>
							<td colspan="3">
								${hpinfo.hpcontent} 
							</td>
						</tr>
						<tr>
							<td>
								注意事项
							</td>
							<td colspan="3">
								${hpinfo.alertinfo} 
							</td>
						</tr> 
						<tr>
							<td>
								功效
							</td>
							<td colspan="3">
								<span id="effectlist" ></span> 
							</td>
						</tr> 
						<tr>
							<td>
								适应症
							</td>
							<td colspan="3">
								<span id="dsslist1"></span> 
							</td>
						</tr> 
						<tr>
							<td>
								禁忌症
							</td>
							<td colspan="3">
								<span id="dsslist2"></span> 
							</td>
						</tr> 
					</table>  
		</div>
		</div>
	</body>
</html>

<script>
var rid = '${hpinfo.id}';
loadDssinfo(rid); 
loadEffectinfo(rid);
</script>